package com.hulk.ratel.common.constant.enums;

import com.google.common.base.Objects;

/**
 * Created by liqingxue on 2017/11/7.
 * 清算类型
 */
public enum SettleType {

    DC("DC", "直清"),
    SC("SC", "非直清");

    private String value;

    private String desc;

    SettleType(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static String explain(String value) {
        for (SettleType obj : SettleType.values()) {
            if (Objects.equal(value, obj.value)) {
                return obj.desc;
            }
        }
        return value;
    }

    public String getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    @Override
    public String toString() {
        return this.value;
    }

}
